package www.dashu.com.domain;

import www.dashu.com.domain.base.BaseVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity
@Table(name="c_product_attribute_value")
public class CProductAttributeValue extends BaseVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("")
    @Id
    private Long id;

    @ApiModelProperty("")
    @Column(name = "product_id")
    private Long productId;

    @ApiModelProperty("")
    @Column(name = "product_attribute_id")
    private Long productAttributeId;

    @ApiModelProperty("手动添加规格或参数的值，参数单值，规格有多个时以逗号隔开")
    @Column(name = "value")
    private String value;

    @ApiModelProperty("手动添加时的待选项")
    @Column(name = "oprations")
    private String oprations;

    @ApiModelProperty("手动添加时的待选项")
    @Column(name = "price")
    private String price;


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productId=").append(productId);
        sb.append(", productAttributeId=").append(productAttributeId);
        sb.append(", value=").append(value);
        sb.append(", oprations=").append(oprations);
        sb.append("]");
        return sb.toString();
    }

}